factor out greatest common factor

visit shbcf.ru